package com.codingman.springdemo2;

import java.util.List;
import java.util.Map;

public class Company {
	private String name;
	private List<Address> addressList;
	private Map<Student, Address> addressMap;
	
	public Company() {
		
	}
	
	public Company(String name, List<Address> addressList, Map<Student, Address> addressMap) {
		this.name = name;
		this.addressList = addressList;
		this.addressMap = addressMap;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<Address> getAddressList() {
		return addressList;
	}

	public void setAddressList(List<Address> addressList) {
		this.addressList = addressList;
	}

	public Map<Student, Address> getAddressMap() {
		return addressMap;
	}

	public void setAddressMap(Map<Student, Address> addressMap) {
		this.addressMap = addressMap;
	}

	
	public void show() {
		System.out.println("name : " + name);
		System.out.println("list : ");
		for(Address address : addressList) {
			System.out.println(address);
		}
		System.out.println("map : ");
		for(Map.Entry<Student, Address> entry : addressMap.entrySet()) {
			 System.out.println(entry.getKey()+" : "+entry.getValue());
		}
	}
}
